Keir Fraser [Thu, 6 Aug 2009 08:14:52 +0000 (09:14 +0100)]
ept p2m: set rwx flags to 0 for invalid and mmio_dm types.
Read/write/execute flags are set to 1 before calling the type_to_flags
function which sets them to their appropriate values depending on the
p2m type. However, in invalid, mmio_dm, and default/unknown cases in
type_to_flags just falls through, unsafely leaving full access to
these pages.
Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>
Keir Fraser [Wed, 5 Aug 2009 13:56:29 +0000 (14:56 +0100)]
Revert 20006:
edf21ab7d7a4 and 20023:
2b28320c6f8c.
Keir Fraser [Wed, 5 Aug 2009 13:39:46 +0000 (14:39 +0100)]
Revert to pulling QEMU GIT repo via HTTP.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 5 Aug 2009 13:03:38 +0000 (14:03 +0100)]
xend: Remove _setSchedParams
Currently, xc.sched_credit_domain_set is called twice when domains
are created.
start@XendDomainInfo
_constructDomain
xc.sched_credit_domain_set --- 1st
_initDomain
_setSchedParams
domain_sched_credit_set
xc.sched_credit_domain_set --- 2nd
resume@XendDomainInfo
_constructDomain
xc.sched_credit_domain_set --- 1st
_setSchedParams
domain_sched_credit_set
xc.sched_credit_domain_set --- 2nd
This patch removes _setSchedParams method added by changeset 19955,
because xc.sched_credit_domain_set was added into _constructDomain
method by changeset 20006.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Wed, 5 Aug 2009 13:02:46 +0000 (14:02 +0100)]
x86 vmx: Accelerate VLAPIC EOI writes
Our testing indicates that most apic accesses are eoi writes. This
patch accelerate guest EOI emulation utilizing HW VM Exit
information.
Without this patch, xentrace shows the apci access average tsc costs
is ~7.8k in our case and it down to ~3k with it. We also save 3% cpu
in our case.
From: Yang Zhang <yang.zhang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 5 Aug 2009 12:50:36 +0000 (13:50 +0100)]
x86: CPU synchronization while doing MTRR register update
The current Xen code does not synchronize all the cpus while
initializing MTRR registers when a cpu comes up.=20
As per IA32 SDM vol 3: Section: 10.11.8 MTRR Considerations in MP
Systems, all the processors should be synchronized while updating
MTRRs.
Processors starting with westmere are caching VMCS data for better VMX
performance. These processors also has Hyper-threading support. With
hyper-threading, when one thread's cache is disabled, it also disables
cache for the sibling threads. And MTRR register updating procedure
involves cache disabling. So if cpus are not synchronized, updating
MTRR registers on a thread, results in the VMCS data from sibling
threads becoming inaccessible, and it causes system failure.
With this patch while updating the MTRR registers, all the cpus are
synchronized as per the IA32 SDM. Also at the boot time and resume
time when multiple cpus are brought up, an optimization is added to
delay the MTRR initialization until all the cpus are up, to avoid
multiple times cpu synchronization.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Suresh B Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Asit K Mallick <asit.k.mallick@intel.com>
Keir Fraser [Wed, 5 Aug 2009 12:49:35 +0000 (13:49 +0100)]
x86: Enable GNTTABOP_copy hypercall for HVMs
This requires plumbing 32-bit compat guests through the compat version
of teh grant-table hypercall.
Signed-off-by: Jayaraman, Bhaskar <Bhaskar.Jayaraman@lsi.com>
Keir Fraser [Wed, 5 Aug 2009 12:40:21 +0000 (13:40 +0100)]
xm-test restore: use ext3 (instead of ext2) and xvda (instead of hda)
This patch fixes the xm-test restore 04 testcase:
o uses ext3 instead of ext2 - which is not supported by the standard
kernel config
o uses xvdX instead of hdX for disks
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Wed, 5 Aug 2009 12:39:37 +0000 (13:39 +0100)]
xm-test: Disable DEBUG_STACK_USAGE which breaks test cases
The unnecessary 'used greatest stack depth' messages on the console
breaks xm-test cases by random. Typically a testcase reads input from
the console and parses it. When DEBUG_STACK_USAGE is enabled, these
stack usage messages are printed by random - the test case reads this
message, cannot handle it and fails.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Wed, 5 Aug 2009 12:38:38 +0000 (13:38 +0100)]
xm-test: fix network13 test (protocol and extensions)
Attached there is a patch that fixes the used protocol (was udp - but
nobody was listening...) to icmp echo and added the extension, that
the dom0 and the other guest ips are also pinged.
Because of the many different scenarios (three nested loops) over
packet sizes, two guests and different ip addresses, one run of this
test case takes now about 4.5 minutes.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Wed, 5 Aug 2009 12:37:26 +0000 (13:37 +0100)]
xm-test: Adapt memory setting to up-to-date kernel memory consumption
The attached patch fixes xm-test memset 04 that it can be used with up
to date kernels. The old version sets the memory to 15MByte which is
too low for modern kernels: the oom-killer in this case kills the
login shell of the test-case and init. Increased the size to 18M
which gives the userspace about 2.5 MByte memory.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Wed, 5 Aug 2009 12:36:24 +0000 (13:36 +0100)]
xm-test: 10_block_attach_detach_multiple_devices fixed
This patch fixes and (re-)enables test 10 of the block-create suite.
The tests by random attach and detach devices to / from a domU and
checks if everything is ok.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Wed, 5 Aug 2009 11:06:24 +0000 (12:06 +0100)]
xm-test block-create: use ext3 as filesystem
The current implementation uses ext2 for tests. The tests currently
fail, because the current kernel does not support ext2 by default.
This patch creates an ext3 filesystem for the tests.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Wed, 5 Aug 2009 11:04:39 +0000 (12:04 +0100)]
xend: fix memory leak resulting in long garbage collector runs
In the method xen.xend.XendStateStore.XendStateStore.load_state and
xen.xend.XendStateStore.XendStateStore.save_state the minidom objects
used to load/save the current state of a device type, can't be freed
by the python garbage collector after all references to the top node
are cleared, because of cyclic references between the DOM nodes. So
memory usage of xend increases after calling these methods. To solve
this problem, the unlink() method must be called for a minidom object
before the last reference to the top node is cleared (see python
docs). This breaks the cyclic references, so the garbage collector can
free these objects.
Signed-off-by: juergen.gross@ts.fujitsu.com
Keir Fraser [Wed, 5 Aug 2009 11:03:53 +0000 (12:03 +0100)]
xend: pass-through: Extend multi-function mapping
This extends the mapping between physical and virtual PCI functions
for multi-function pass-through in two ways. If neither of these
rules apply the existing identity-mapping of physical to virtual
functions is used.
1) If physical function zero is not present in a multi-function
pass-through device then the numerically lowest physical function
whose virtual function hasn't explicitly been set will be mapped
to virtual function 0.
This is to satisfy the requirement that a (virtual) device
must always have function 0 present.
2) The virtual function to be used for a physical function may
be explicitly set.
e.g. 00:1d.2=3D0,1=3D1,0=3D2@7 will result in the following
mapping:
physical | virtual
---------+--------
00:1d.2 | 00:07.0
00:1d.1 | 00:07.1
00:1d.0 | 00:07.2
Ranges may also be used with explicit assignment.
The following would result in the same mapping as above:
00:1d.2=3D0-0=3D2@7
Please be aware that it is very likely that using these extensions
it is possible to create mappings that do not work. If in doubt
please use identity-mapping.
Cc: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Keir Fraser [Wed, 5 Aug 2009 11:03:08 +0000 (12:03 +0100)]
xend: passthrough: add checking when a device is hotplugged into pv guest.
When we 'xm pci-attach' device into pv guest, we also need to check if
the device is owned by pciback or pci-stub, if the device has been
assigned, etc.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Sun, 2 Aug 2009 12:43:15 +0000 (13:43 +0100)]
Add a single trigger for all diagnostic keyhandlers
Add a new keyhandler that triggers all the side-effect-free
keyhandlers. This lets automated tests (and users) log the full set
of keyhandlers without having to be aware of which ones might reboot
the host.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 2 Aug 2009 11:29:25 +0000 (12:29 +0100)]
Make ACPI Cx keyhandler always print something
...so that from a serial log you can tell the difference between not
pressing the key and not having anything interestying to print.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Sun, 2 Aug 2009 11:28:22 +0000 (12:28 +0100)]
xend: pci: Use PCIe FLR for VF of Intel 82599 10GbE Controller
We know it does have PCIe FLR capability even if it doesn't report
that.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Sun, 2 Aug 2009 11:27:51 +0000 (12:27 +0100)]
xend: passthrough: loosen the pci co-assignment for pv guest
In current xend, we can not assign co-assignment devices to different
guests, even for pv guests. This patch loosens the policy for pv
guest: if none of the co-assignment devices have been assigned to hvm
guest, we can assign the devices to different pv guests.
The patch also adds a detection: if a device has been assigned to
guest, we can't try to "xm pci-attach" it to the same guest again.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Sun, 2 Aug 2009 11:26:23 +0000 (12:26 +0100)]
xend: save/restore cpu_weight and cpu_cap
This patch allows vcpus_params cpu_weight and cpu_cap to be saved and
restored. Most the code to support this already existed, but the save
path needed to be updated to explicitly save these params, and the
restore path needed to be updated to resend the params down to the
kernel.
From: Andrew Jones <drjones@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Sun, 2 Aug 2009 11:25:01 +0000 (12:25 +0100)]
Compile the kernel by default with bridge support
This one-liner adds bridge support to the Linux kernel
(CONFIG_BRIDGE=y). It is a precondition for some xm-tests that
bridge is enabled. Also IMHO it makes sense to configure a dom0 with
bridge capabilities.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Sun, 2 Aug 2009 11:23:46 +0000 (12:23 +0100)]
xm-test: ramdisk fs type is changed to ext3 if needed
This (one line) patch changes the type of the xm-test initrd from ext2
to ext3 when needed. It first checks, if ext2 support is missing and
ext3 support is available. If so the fs type is changed to ext3.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Sun, 2 Aug 2009 11:22:03 +0000 (12:22 +0100)]
tools/tests/regression/: Fix some paths and scripts.
o scripts and Makefile are mostly location independent now
(exception XEN_ROOT in Makefile)
o use of $() instead of ${} in Makefile
From: Andreas Florath <xen@flonatel.org>
Signed-off-by: Keir Fraser <Keir.Fraser@eu.citrix.com>
Keir Fraser [Thu, 30 Jul 2009 16:56:23 +0000 (17:56 +0100)]
i386: fix full-value calculation of wrmsr handling for pv guests
The MSR value must be held in a 64-bit variable, not an unsigned long.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 29 Jul 2009 08:20:46 +0000 (09:20 +0100)]
xm-test: Fix memset 01 and 02 tests: add support for sysfs memory interface
From: Andreas Florath <xen@flonatel.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 29 Jul 2009 08:19:30 +0000 (09:19 +0100)]
xend: pci: fix a typo in do_Dstate_transition
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Wed, 29 Jul 2009 08:19:13 +0000 (09:19 +0100)]
xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create()
* Use pci_dict_to_bdf_str() in hvm_pci_device_create()
* Use pci_name instead of pci_str in error message, pci_str does not
* exist
Signed-off-by: Simon Horman <horms@verge.net.au>
Acked-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Tue, 28 Jul 2009 15:48:06 +0000 (16:48 +0100)]
ns16550: check_existence() can be marked __init
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 28 Jul 2009 15:47:37 +0000 (16:47 +0100)]
ns16550: More robust check for presence of FIFO
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 28 Jul 2009 15:43:50 +0000 (16:43 +0100)]
xend: make a crash dump directory per DomU
Currently, xend dumps a core file of a DomU
in the directory "/var/xen/dump/", when the DomU has crashed.
The patch modifies this directory to "/var/xen/dump/<domain name>/".
It enables you to select HDD partition per DomU to dump core by using
mount command.
Signed-off-by: Rikiya Ayukawa <ayukawa.rikiya@jp.fujitsu.com>
Keir Fraser [Tue, 28 Jul 2009 15:42:12 +0000 (16:42 +0100)]
xend: pass-through: fix "xm pci-list-assignable-devices' for pv_guest
xc.test_assign_device(dev) can only tell us if dev is assigned to hvm
guest; if a device is assigned to pv guest, xc.test_assign_device()
still tells us the device is not assigned yet, as a result, the device
still appears in the output of "xm pci-list-assignable-devices", and
xend would not prevent us from assigning the device to a new pv or hvm
guest.
To judge if a device has been assigned to guest, we have to scan
xenstore.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Tue, 28 Jul 2009 15:41:13 +0000 (16:41 +0100)]
xend: pass-through: fix pci passthrough for pv guest
C/S 19754:
a5f584c1e2f6 breaks pci passthrough for pv guest.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Tue, 28 Jul 2009 15:40:34 +0000 (16:40 +0100)]
x86,hvm: clean up vpt's period_cycles field
In struct periodic_time, pt->period_cycles is not cpu cycles since c/s
17716 and its value is always the same as pt->period.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Tue, 28 Jul 2009 15:38:08 +0000 (16:38 +0100)]
tools/tests: Add syntax check for different versions of python
From: Andreas Florath <xen@flonatel.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 28 Jul 2009 15:34:16 +0000 (16:34 +0100)]
x86: Initialize the ACPI "safe" power state to C1.
Initialize the ACPI "safe" power state to C1. This avoids a null
dereference on BIOS tables which define C3 but not C2 or C1.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Tue, 28 Jul 2009 15:33:46 +0000 (16:33 +0100)]
xend: fix migration hangs by closing fds on exec
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Reviewed-by: Xiaowei Hu <xiaowei.hu@oracle.com>
Keir Fraser [Tue, 28 Jul 2009 15:32:26 +0000 (16:32 +0100)]
xend: pass-through: device state in xenstore may be null
Signed-off-by: Tom Rotenberg <tom.rotenberg@gmail.com>
Keir Fraser [Tue, 28 Jul 2009 15:28:21 +0000 (16:28 +0100)]
passthrough: use tasklet to deliver interrupts
This patch enables delivery of interrupts even if the VCPU#0 is
halted.
Note: the changes to softirq.{ch} are needed for ia64 build.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Tue, 28 Jul 2009 15:24:47 +0000 (16:24 +0100)]
hvm vlapic: Fix vlapic_write() for partial register writes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 28 Jul 2009 15:16:32 +0000 (16:16 +0100)]
xend: pass-through: Use parse_pci_name() in find_parent()
Signed-off-by: Simon Horman <horms@verge.net.au>
Keir Fraser [Tue, 28 Jul 2009 15:15:18 +0000 (16:15 +0100)]
x86_32: handle x87 opcodes in TLS segment fixups
This patch adds support to the TLS fixup code for x87 opcodes. These
can be treated like 2-byte opcodes with a weird encoding.
The patch includes some extra changes because, now that we have >2
opcode tables and 9 different lead bytes in a two-byte opcode, a
simple boolean code will not be enough to differentiate one- and
two-byte opcodes. Besides this, the patch is trivial since the
segment fixup code cares about the operands of the instruction, not
about its semantics.
From: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 24 Jul 2009 11:08:54 +0000 (12:08 +0100)]
Revert 19961: breaks xend start on some systems.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 24 Jul 2009 09:39:43 +0000 (10:39 +0100)]
xend: Fix use of set() for Python 2.3.
From: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 24 Jul 2009 09:37:52 +0000 (10:37 +0100)]
hvmloader: Fix get_memsize() to cast high_mem_pgend to 64 bits.
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Keir Fraser [Thu, 23 Jul 2009 08:01:30 +0000 (09:01 +0100)]
python: make tools/python/xen/util/fileuri.py work on python 2.3
@staticmethod syntax sugar was introduced at python2.4.
expand the syntax sugar for python 2.3
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Thu, 23 Jul 2009 08:00:55 +0000 (09:00 +0100)]
hoplugpath.sh: fix Makefile dependency.
In tools/hotplug/common/Makefile, install-scripts depends on genpath.
So add its dependency. Otherwise parallel build sometimes fails as
follows.
genpath and install-scripts command are being run simultaneously.
So When install-scripts tries to install it, it can be under creation.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Thu, 23 Jul 2009 08:00:21 +0000 (09:00 +0100)]
xend: Don't call decode() if PV_{kernel,ramdisk} are ''
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Thu, 23 Jul 2009 07:59:03 +0000 (08:59 +0100)]
xend: Set up CPUID leaves on restore for both PV and HVM guests.
From: Andrew Thomas <andrew.thomas@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 23 Jul 2009 07:57:02 +0000 (08:57 +0100)]
fs-front: cope with a missing fs-backend
Obviously save\restore is not going to work if fs-backend is missing,
but at least the stubdom will be able to work correctly in all the
other cases.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Keir Fraser [Thu, 23 Jul 2009 07:56:15 +0000 (08:56 +0100)]
stubdom: update README as no reason to specify absolute paths
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Thu, 23 Jul 2009 07:53:00 +0000 (08:53 +0100)]
Revert QEMU_TAG to
5cc34ea27f1cbd1a0560cfca91fb89ccd6d5726f
xenstore lowlevel function changes breaks stubdom build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 22 Jul 2009 13:37:30 +0000 (14:37 +0100)]
tools: xenbackendd for NetBSD
Attached patch introduces xenbackendd. It is used on NetBSD
to launch the hotplug scripts. Later xenbackendd can be improved to
also launch qemu-dm as child process and will notice when qemu-dm
crashes.
The changes the patch makes:
- rename hotplug scripts as xenbackendd expects them
(current names were taken from pkgsrc)
- install hotplug scripts as executable scripts
- introduce xenbackendd
- build/install/launch on NetBSD only
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 22 Jul 2009 13:06:21 +0000 (14:06 +0100)]
page allocator: add mfn_valid() check to free_heap_pages() and scrub_pages()
The changesets, 19913:
ef38784f9f85 and 19914:
d6c1d7992f43 eliminates
boot allocator bitmap which is also used for buddy allocator bitmap.
With those patches, xen/ia64 doesn't boot because page allocator
touches struct page_info which doesn't exist.
That happends because memory is populated sparsely on ia64
and struct page_info is so.
This patches fixes ia64 boot failure.
In fact, this is also a potential bug on x86. max_page seems
to be well aligned so that MAX_ORDER loop check prevented
to be bug appear.
- fix free_heap_pages().
When merging chunks, buddy page_info() doesn't always exists.
So check it by mfn_valid().
- fix scrub_pages()
On ia64 page_info() is sparsely populated, so struct page_info
doesn't always exist. Check it by mfn_valid()
- offline_pages(), online_pages() and query_page_offline()
Also replace "< max_page" check with mfn_valid() for consistency.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Wed, 22 Jul 2009 13:05:26 +0000 (14:05 +0100)]
xend: pass-through: use identity-mapping of PCI functions
This reverses changeset "xend: pass-through: Implement least-mapping
of virtual" (19854:
22067ba1de0d) and reverts the code to identity
mapping physical PCI functions to virtual ones when multi-function
virtual devices are in use. It is my opinion that this is both safer
and simpler than least-mapping, and that in the absence of further
analysis identity-mapping the best choice for now.
Signed-off-by: Simon Horman <horms@verge.net.au>
Keir Fraser [Wed, 22 Jul 2009 13:04:14 +0000 (14:04 +0100)]
tools: implement balloon stat and cpuinfo for NetBSD
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 22 Jul 2009 13:03:32 +0000 (14:03 +0100)]
x86 mce: Fix formatting in a couple of printks.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 22 Jul 2009 13:02:36 +0000 (14:02 +0100)]
Keir Fraser [Tue, 21 Jul 2009 14:47:41 +0000 (15:47 +0100)]
xsm: Move ACM_DEBUG and printkd() out of public header. They are
private to the ACM implementation within Xen.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 21 Jul 2009 14:34:56 +0000 (15:34 +0100)]
xsm: Do not use gcc-ism in public header file.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 21 Jul 2009 13:26:52 +0000 (14:26 +0100)]
xend: pass-through: fix regression in the ordering of the output of xm pci list
changeset "python: Remove tab indents" (19937:
e845326ae203)
introduces a minor regression in the multi-function PCI pass-through
code by causing bogus return values from the sort function
which is used to order the output of "xm pci list".
Signed-off-by: Simon Horman <horms@verge.net.au>
Keir Fraser [Tue, 21 Jul 2009 11:06:52 +0000 (12:06 +0100)]
Revert part of c/s 19349: fixes qcow for HVM guests
Keir Fraser [Mon, 20 Jul 2009 14:51:14 +0000 (15:51 +0100)]
Remove support for out-of-date SLES9 and RHEL4 kernel
ports from build integration
Both distros now include Xen support from their respective upstreams
and these kernels are very out of date wrt both the upstream distro
kernel and the upstream Xen kernel.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Mon, 20 Jul 2009 14:45:50 +0000 (15:45 +0100)]
libxenguest: Revert domain builder interface changes for 'superpages'
parameter, and place the flag in a pad byte of 'struct xc_dom_image'
instead.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 20 Jul 2009 09:58:06 +0000 (10:58 +0100)]
libxc: Use a single mmap interface to Linux
Modify xc_map_foreign_range and xc_map_foreign_ranges to call
mmap_map_foreign_batch. This eliminates the need for multiple privcmd
mmap ioctls. Now only IOCTL_PRIVCMD_MMAPBATCH is required.
Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>
Keir Fraser [Mon, 20 Jul 2009 09:12:38 +0000 (10:12 +0100)]
xend: Add support for URI ('file:' and 'data:' scheme) for PV/kernel and PV/ramdisk
Add support for 'file:' and 'data:' URI schemes for the parameters
'PV/kernel' and 'PV/ramdisk' in the VM.create() call. The 'data:'
scheme handling enables using a file which is stored inside the
management system (from where the XenAPI call is send) as kernel or
ramdisk.
Notes:
o all included: a detailed description can be found in the xenapi
documentation
o bumped up the version of the API document to 1.0.8 (because of
(minimal) interface extension)
o Future enhancements (like http:, ftp: schemes) fit seamlessly into
the current design / classes
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Mon, 20 Jul 2009 09:10:15 +0000 (10:10 +0100)]
x86: make show_page_walk() more robust
Also add in a missing line in x86-64's do_page_walk().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 20 Jul 2009 09:09:00 +0000 (10:09 +0100)]
xend: modify sort() for Python 2.3
Python 2.3 does not support the sort(cmp, key, reverse) style.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Mon, 20 Jul 2009 09:08:12 +0000 (10:08 +0100)]
blktap2: Remove set() for Python 2.3
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Mon, 20 Jul 2009 09:07:28 +0000 (10:07 +0100)]
ia64: Define paging_mode_external(), now needed by grant_table.c
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 20 Jul 2009 09:02:50 +0000 (10:02 +0100)]
Use git smart server protocol for qemu tree by default
xenbits supports the git protocol now, which is much faster (and
produces less noise in the build log too).
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Thu, 16 Jul 2009 09:32:55 +0000 (10:32 +0100)]
xend: Restore scheduling parameters
Scheduling parameters are reset to default values when I restore
or migrate a domain.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Thu, 16 Jul 2009 09:30:50 +0000 (10:30 +0100)]
hvmloader: Add new test for MSR_SHADOW_GS_BASE validity after SWAPGS instruction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Jul 2009 09:26:55 +0000 (10:26 +0100)]
vmx: Fix handling of FS/GS base MSRs.
Firstly, these MSRs are always accessible if the CPU supports them --
we should not check for EFER.LMA.
Secondly, we should not use teh cached value of shadow_gs while the
VCPU is running. It can be stale if the guest has executed SWAPGS
(which we cannot trap). Hence always access the underlying host MSR
when emulating guest accesses.
The latter bug was found and a patch proposed by <leonid@3tera.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Jul 2009 07:30:23 +0000 (08:30 +0100)]
tmem: No noise when disabled and not configured
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Jul 2009 07:26:29 +0000 (08:26 +0100)]
x86 svm: Disable intercepting CR3 writes when nested paging is enabled
This patch disables intercepting CR3 writes when nested paging is
enabled. For applications which cause excessive CR3 accesses, the
patch can increase their performance.
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Keir Fraser [Wed, 15 Jul 2009 15:21:12 +0000 (16:21 +0100)]
x86: extend some of Intel's recent MCE work to also support AMD
At least the MSR handling for guests can easily be made shared between
the two vendors; likely a lot of the other code in mce_intel.c could
also be made common. The goal here, however, is to eliminate the
annoying guest-tried-to-modify-msr messages that result from enabling
the MCE code on the Linux side.
Additionally (in order for not having to make the same change twice to
basically identical code) the patch also merges
amd_{fam10,k8}_mcheck_init(), enables the former to also be used for
Fam11 (I'd suppose that Fam12 would also need to go here, but I have
no data to confirm that), and does some minor (mostly coding style for
the code moved around) adjustments.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 15 Jul 2009 14:33:05 +0000 (15:33 +0100)]
tools/check: We do need a default for ${PYTHON} as called from
install.sh with PYTHON possibly undefined in the environment.
So we make PYTHON=python the sensible default.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 15 Jul 2009 13:53:01 +0000 (14:53 +0100)]
tools/check: No need to check for ${PYTHON} existence.
It must exist as otherwise the build will fail since we reference
$(PYTHON) all over the place. Furthermore the fallback of
'/usr/bin/env python' actually runs Python, it doesn't get the path to
it. So that wouldn't work very well.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 15 Jul 2009 13:35:34 +0000 (14:35 +0100)]
i386: eliminate unsupported CPUs' MCA handling code
Neither Intel P5 nor Winchip are supported by Xen (due to
-march=i686 being passed to the compiler), so there is no point in
having code for handling their (rudimentary) MCA capabilities.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 15 Jul 2009 12:15:50 +0000 (13:15 +0100)]
Rename for_each_cpu() to for_each_possible_cpu()
... to be more precise in naming, and also to match Linux.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 15 Jul 2009 12:07:30 +0000 (13:07 +0100)]
i386: fix handling of Xen entries in final L2 page table
Running Xen on top of KVM exposed an issue that latently also exists
on real hardware: So far, updating any L3 entry resulted in the Xen
owned part of the L2 table referenced by the final L3 one to be re-
initialized. This was not only unnecessary, it actually resulted in
Xen relying on the TLB entry which maps the L2 page that's being
updated not going away intermediately, since as a first step the full
range of Xen owned entries in the L2 were replaced by the respective
ones from the idle page table, and only then the per-domain entries
got re- written to their intended values.
This part of the initialization really is sufficient to be done once,
when the page becomes an L2-with-Xen-entries (PGT_pae_xen_l2) one,
i.e. can be moved to alloc_l2_table(). Only the linear page table
setup has to remain where it always was.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 15 Jul 2009 09:31:50 +0000 (10:31 +0100)]
stubdom: make -> $(MAKE)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 15 Jul 2009 09:30:59 +0000 (10:30 +0100)]
Fix a couple of comment typos.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 15 Jul 2009 08:14:19 +0000 (09:14 +0100)]
x86: Fix an oversight of c/s 19927 - per-CPU data accesses must
not be iterated over using NR_CPUS bound loops.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 15 Jul 2009 08:11:40 +0000 (09:11 +0100)]
stubdom: don't leak include dir on distclean
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Wed, 15 Jul 2009 08:09:48 +0000 (09:09 +0100)]
minios: switch to C99 integer types
This is a necessary step to make minios build on NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 14 Jul 2009 20:25:24 +0000 (21:25 +0100)]
debug=y default during development
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 14 Jul 2009 13:46:04 +0000 (14:46 +0100)]
stubdom: fix stubdom-dm error path
Exit the shell and not a subshell.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Tue, 14 Jul 2009 13:43:19 +0000 (14:43 +0100)]
python: Remove tab indents.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 14 Jul 2009 13:38:56 +0000 (14:38 +0100)]
pass-through: use vdevn in xm_pci_attach()
Use vdevfn in xm_pci_attach() for non-zero functions,
the vslot element of dev dictionaries no longer exists.
Signed-off-by: Simon Horman <horms@verge.net.au>
Keir Fraser [Tue, 14 Jul 2009 13:37:53 +0000 (14:37 +0100)]
docs/xenapi: Update examples section reflecting the current behaviour.
Signed-off-by: Andreas Florath <xen@flonatel.org>
Keir Fraser [Mon, 13 Jul 2009 15:50:53 +0000 (16:50 +0100)]
stubdom: Install and use stubdompath.sh
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Mon, 13 Jul 2009 15:49:50 +0000 (16:49 +0100)]
x86-64: reduce symbol table size
With all of Xen's symbols sitting within a 2Gb range on x86-64, they
can be referred to by the kallsyms-like offset table using 4- instead
of 8-byte slots.
The marker table can use 4-byte slots in all cases, just like the
table entry counts can (though that's only a minor improvement).
If ia64's PERCPU_ADDR got moved down to (KERNEL_START + 2Gb -
PERCPU_PAGE_SIZE), it could also utilize the more compact form.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 13 Jul 2009 11:35:34 +0000 (12:35 +0100)]
Mapping grant references into HVM guests, take 2
After some discussion, here's a second version of the patch I posted a
couple of weeks back to map grant references into HVM guests. As
before, this is done by modifying the P2M map, but this time there's
no new hypercall to do it. Instead, the existing GNTTABOP_map is
overloaded to perform a P2M mapping if called from a shadow mode
translate guest. This matches the IA64 API.
Signed-off-by: Steven Smith <steven.smith@citrix.com>
Acked-by: Tim Deegan <tim.deegan@citrix.com>
CC: Bhaskar Jayaraman <Bhaskar.Jayaraman@lsi.com>
Keir Fraser [Mon, 13 Jul 2009 11:18:04 +0000 (12:18 +0100)]
Eliminate grant_table_op restriction
Eliminate the hard-coded, arbitrarily chosen limit of 512 grant table
ops a domain may submit at a time, and instead check for necessary
preemption after each individual element got processed, invoking the
hypercall continuation logic when necessary.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 13 Jul 2009 11:17:05 +0000 (12:17 +0100)]
Allow XENMEM_exchange to support exchange on foreign domains.
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Keir Fraser [Mon, 13 Jul 2009 10:52:49 +0000 (11:52 +0100)]
VT-d: fix assertion fault in pci passthrough code
Remove ASSERT(spin_is_locked(&pcidevs_lock)) in
pci_get_pdev_by_domain() to allow caller the flexibility to not hold
the lock if it does not care if the device is hot removed between the
time it got the pdev and the time it is used to get the corresponding
vt-d engine. In the new RHSA use case, we just wanted to get the vt-d
engine of any device passthrough in the domain. Also, rename RHSA
field "domain" to "proximity domain" to avoid overloading the term
"domain" in virtualization context.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Keir Fraser [Mon, 13 Jul 2009 10:51:07 +0000 (11:51 +0100)]
x86: merge final linking scripts
While unrelated to the previous four patches, I realized that the two
scripts are nearly identical when coding those earlier patches, and
this patch depends on them in order to apply cleanly.
As an extra measure, it also adjusts the (unused) space freed at the
end of the per-CPU area to include all alignment space needed before
the first actual constituent of the .bss section (up to 7 pages on
x86-64).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 13 Jul 2009 10:45:31 +0000 (11:45 +0100)]
Move cpu_{sibling,core}_map into per-CPU space
These cpu maps get read from all CPUs, so apart from addressing the
square(nr_cpus) growth of these objects, they also get moved into the
previously introduced read-mostly sub-section of the per-CPU section,
in order to not need to waste a full cacheline in order to align (and
properly pad) them, which would be undue overhead on systems with low
NR_CPUS.
Signed-off-by: Jan Beulich <jbeulich@novell.com>